﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="gojira._Default" %>

<%@ Register Assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
    Namespace="System.Web.UI.DataVisualization.Charting" TagPrefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2 style="color: RED">
        Welcome to godzilla collector!</h2>
    <br />
    Perhaps the most frustrating part of being a Godzilla fan is being able to find 
    the films on video or DVD, especially here in the UK. This is a site for fans 
    who are trying to build their own DVD/Blu Ray collections and do not know where 
    to start.<br />
    <br />
    Or if you just like giant monsters battling in miniature cities and want to show 
    off your stuff or if you want to learn more about the Godzilla series, this is 
    the place to be!<br />
    <br />
    To see the full list of Godzilla films click <a href="Films.aspx" style="color: #FF0000">here.</a>
    <br />
    <br />
    To see the list of Godzilla films that are on DVD/Blu-Ray, click <a href="releaseList.aspx">here.</a>
    <br />
    <br />
    To see the merchandise collected by members click <a href="MerchandiseList.aspx">here.</a>
    <br />
    <br />
    <br />
    <div style="float:left">
        Most popular film:<br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ID" DataSourceID="SqlDataSource1" GridLines="None" 
        ShowHeader="False" Width="284px">
        <Columns>
            <asp:TemplateField>
            <ItemTemplate>
            <h1 ><%# Eval("FilmName")%> </h1>
            <br />
            <a href='filmDetail.aspx?ID=<%# Eval("ID") %>' >
            <asp:Image runat="server" Height="200px" Width="150px" ImageUrl='<%# Eval("Poster") %>' />
            <a />
            <br />
            <a href='filmDetail.aspx?ID=<%# Eval("ID") %>'>More information about this film</a>
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:godzillaFilms %>" 
        ProviderName="<%$ ConnectionStrings:godzillaFilms.ProviderName %>" 
        SelectCommand="SELECT * FROM [topPopularFilm]"></asp:SqlDataSource>
        </div>
    <div style="float:left; width: 179px; margin-right: 126px;">
        Most active user:<br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource2" GridLines="None" ShowHeader="False">
        <Columns>
            <asp:TemplateField>
            <ItemTemplate>
            <h1> <%# Eval("FanName")%> </h1>
            <br />
            <a href='Profile.aspx?FanName=<%# Eval("FanName") %>'>
            <asp:Image ID="Image1" runat="server" Height="200px" Width="150px" ImageUrl='<%# Eval("Picture") %>' />
            <a />
            <br />
            <a href='Profile.aspx?FanName=<%# Eval("FanName") %>'>View profile</a>
            </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:godzillaFilms %>" 
        ProviderName="<%$ ConnectionStrings:godzillaFilms.ProviderName %>" 
        SelectCommand="SELECT * FROM [mostActiveUser]"></asp:SqlDataSource>
        </div>
    <div style="float:left">
    Recently added:
    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource3" 
        GridLines="None" ShowHeader="False">
            <Columns>
                <asp:TemplateField>
                <ItemTemplate>
                <h1><%# Eval("FilmName")%></h1>
                <br /> 
                <a href='ReleaseDetail.aspx?ID=<%# Eval("ID") %>'>
                <asp:Image ID="Image1" runat="server" Height="200px" Width="150px" ImageUrl='<%# Eval ("FrontCover")%>' />
                </a>
                <br />
                Uploaded by: <%# Eval("Uploader")%>
                <br />
                <a href='ReleaseDetail.aspx?ID=<%# Eval("ID") %>'>View release</a>
                </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
        <asp:SqlDataSource ID="SqlDataSource3" runat="server" 
            ConnectionString="<%$ ConnectionStrings:godzillaFilms %>" 
            ProviderName="<%$ ConnectionStrings:godzillaFilms.ProviderName %>" 
            SelectCommand="SELECT * FROM [recentlyUploadedRelease]"></asp:SqlDataSource>
           </div>
    <br />
    <div style="float:left">
    Where are our users from?<br />
<br />
    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource4" 
            BackColor="DimGray" BackSecondaryColor="64, 64, 64">
        <Series>
            <asp:Series Name="Series1" ChartType="Pie" XValueMember="Country" 
                YValueMembers="countryNumber">
            </asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1">
            </asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
    &nbsp;<asp:SqlDataSource ID="SqlDataSource4" runat="server" 
        ConnectionString="<%$ ConnectionStrings:godzillaFilms %>" 
        ProviderName="<%$ ConnectionStrings:godzillaFilms.ProviderName %>" 
        SelectCommand="SELECT * FROM [userCountries]"></asp:SqlDataSource>
        </div>
</asp:Content>
